﻿using CookieLogin.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CookieLogin.Repository
{
    public class UserRepository
    {
        public void Save(User user)
        {

        }


        public User GetBy(string username)
        {
            if (username == "zhansgan")
            {
                return new User() { Id = 1, UserName = "zhangsan", Password = "123456" };
            }
            else if (username == "admin")
            {
                return new User() { Id = 2, UserName = "admin", Password = "123456" };
            }

            return null;
        }

    }
}
